﻿<?xml version="1.0" encoding="utf-8"?>
<!-- Defines format of patterns documentation that is compatible with .NET API doc format. -->
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="description" type="description-type"/>
  
  <xs:complexType name="description-type">
    <xs:sequence>
      <xs:element name="content" minOccurs="1" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="summary" type="summary-type" minOccurs="1" maxOccurs="1"/>
            <xs:element name="remarks" type="remarks-type" minOccurs="0" maxOccurs="1"/>            
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="sources" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="source" type="xs:string" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="remarks-type" mixed="true">
    <xs:complexContent>
      <xs:extension base="content-type">
        <xs:sequence>
          <xs:element minOccurs="1" maxOccurs="unbounded" name="para" type="para-type"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="summary-type" mixed="true">
    <xs:complexContent>
      <xs:extension base="content-type">
        <xs:sequence>
          <xs:element minOccurs="0" maxOccurs="unbounded" name="para" type="para-type"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="content-type" mixed="true">
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element minOccurs="0" maxOccurs="unbounded" name="c" type="c-type"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" name="code" type="code-type"/>
        <xs:element minOccurs="0" maxOccurs="unbounded" name="list" type="list-type"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="para-type" mixed="true">
    <xs:complexContent>
      <xs:extension base="content-type" />
    </xs:complexContent>
  </xs:complexType>
  
  <xs:complexType name="c-type" mixed="true">
  </xs:complexType>

  <xs:complexType name="code-type" mixed="true">
    <xs:attribute name="language" use="optional" type="xs:string"/>
  </xs:complexType>

  <xs:complexType name="list-type">
    <xs:sequence>
      <xs:element name="listheader" minOccurs="0" maxOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="term" type="xs:string" minOccurs="0" />
            <xs:element name="description" type="xs:string" minOccurs="0" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="item" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType mixed="true">
          <xs:sequence>
            <xs:element name="term" type="xs:string" minOccurs="0" />
            <xs:element name="description" type="xs:string" minOccurs="0" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="type" type="xs:string" />
  </xs:complexType>
</xs:schema>